#include "tools/random_sampling_test.h"
#include <vector>
#include "tools/random_sampling.h"
#include "log.h"

const std::vector<std::vector<float>> features{
{1,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 25},
{2,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 24},
{3,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 23},
{4,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 22},
{5,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 21},
{6,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 20},
{7,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 19},
{8,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 18},
{9,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 17},
{10,  2,  3,  4,  5, 6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 ,20, 21, 22, 23, 24, 16},
};

const std::vector<std::vector<float>> labels{
{1,  0,  0,  0,  0, 0,  0,  0,  0, 0},
{0,  1,  0,  0,  0, 0,  0,  0,  0, 0},
{0,  0,  1,  0,  0, 0,  0,  0,  0, 0},
{0,  0,  0,  1,  0, 0,  0,  0,  0, 0},
{0,  0,  0,  0,  1, 0,  0,  0,  0, 0},

{0,  0,  0,  0,  0, 1,  0,  0,  0, 0},
{0,  0,  0,  0,  0, 0,  1,  0,  0, 0},
{0,  0,  0,  0,  0, 0,  0,  1,  0, 0},
{0,  0,  0,  0,  0, 0,  0,  0,  1, 0},
{0,  0,  0,  0,  0, 0,  0,  0,  0, 1},
};

void RandomSamplingTest::test()
{
    RandomSampling random_sampling(features, labels);
    std::vector<std::vector<float>*> batch_features{};
    std::vector<std::vector<float>*> batch_labels{};
    for(int64_t index = 0; index < 10; index++)
    {
        random_sampling.sampling(index, batch_features, batch_labels);
        LogInfo() << "index: " << index <<  ", batch_features: " << batch_features <<  ", batch_labels: " << batch_labels;
    }
}